/**
 * 交易概览
 */
import React  from 'react'
import style from './index.less'
import { DataNone} from '../../components'
import {Table} from 'antd';


const TradeOverview =({data})=>{
  const myProps={
    columns: [
      {
        title: 'Name',
        dataIndex: 'name',
        key: 'name'
      }, {
        title: 'Value',
        dataIndex: 'value',
        key: 'value'
      }
    ],
    dataSource: [
      {
        key: '1',
        name: '交易总额',
        value: data.totalbalance
      }, {
        key: '2',
        name: '买入交易总额',
        value: data.totalbuybalance
      }, {
        key: '3',
        name: '卖出交易总额',
        value: data.totalsellbalance
      }, {
        key: '4',
        name: '订单数／交易笔数',
        value: data.ordertradenum
      }, {
        key: '5',
        name: '平均交易额每订单／每笔交易',
        value: data.balanceper
      }, {
        key: '6',
        name: '执行率',
        value: data.exerate
      }, {
        key: '7',
        name: '隐性成本',
        value: data.impcost
      }, {
        key: '8',
        name: '显性成本',
        value: data.expcost
      }
    ],
    rowKey:'name'
  }
  return (
              <div className={`table ${style.table}`}>
                {
                  data?<Table {...myProps} pagination={false} size="small"/>: <DataNone />
                }
              </div>
        )
}

// TradeOverview.propTypes={
// data
// }

export default TradeOverview
